import type { LoginData, LoginResult } from './types'
import request from '@/utils/request'

export function loginApi(data: LoginData): Promise<LoginResult> {
	return request({
		url: '/api/v1/auth/login',
		method: 'post',
		params: data,
	})
}

export function getCaptcha() {
	return request({
		url: '/api/v1/auth/captcha',
		method: 'get',
	})
}
